A situation that a front camera or a rear camera is blocked may occur when a flexible screen is folded. For example, an upper half of the flexible screen being folded forward causes the front camera to be blocked and the rear camera becomes the front camera, or an upper half of the flexible screen being folded backward causes the rear camera to be blocked and the front camera becomes the rear camera. Since a system does not know which camera is blocked, in this case, a user needs to manually select a non-blocked camera to take pictures. Further, in the folding cases described above, the system does not know that the non-blocked camera has already been inverted, that is, the original front camera has become an actual rear camera, a captured image is upside down. This results in poor user experience.